-
Notifications
You must be signed in to change notification settings - Fork 39
feat: add secp256k1 ecrecover precompile #1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor issue, other LGTM!
59e641a
to
20b947b
Compare
@hero78119 I reconsidering the approach to add secp256k1 support, I prefer to fork & modify k256 crate and use it here now. see also the sp1 codes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM!
btw @lightsing could you also left some hints for future works, e.g. how to patch syscall for k256
to accelerate bigint operation? it would help when bigint
precompile ready 🙏
Note that in this version, we don't have bigint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
patch crate: https://github.com/scroll-tech/elliptic-curves/tree/ceno/k256-13.4
test_secp256k1_ecrecover, runs 5 ecrecover: